﻿using AppService.IService.Basic_information;
using Domain.Entity.Basic_information;
using Domain.IRepository.Basic_information;
using Domain.IRepository.System_operation;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;

namespace AppService.Service.Basic_information
{
    [Dependency(ServiceLifetime.Scoped)]
    public class Ct_Service : ICt_Service
    {
        private readonly ICt_Repository ct_Repository;

        public Ct_Service(ICt_Repository CtRepository)
        {
            this.ct_Repository = CtRepository;
        }

        public bool AddCt(Customer_ment customer)
        {
            return ct_Repository.AddCt(customer) > 0;
        }

        public bool DelCt(int id)
        {
            return ct_Repository.DelCt(id);
        }

        public Customer_ment GetCustomer(int id)
        {
            return ct_Repository.GetCustomer(id);
        }

        public List<Customer_ment> GetCustomer_ments(int currentPage, int PageSize)
        {
            return ct_Repository.GetCustomer_ments(currentPage, PageSize);
        }

        public bool UpdCt(Customer_ment customer_ment)
        {
            return ct_Repository.UpdCt(customer_ment) > 0;
        }
        
        public List<Customer_ment> Customer_condition(int currentPage, int PageSize, string? Create_time, string? value2)
        {
            return ct_Repository.Customer_condition(currentPage, PageSize,Create_time,value2);    
        }

        public int Count(string? Create_time, string? value2)
        {
            return ct_Repository.Count(Create_time,value2);
        }
    }
}
